<!doctype html>
<html lang="zh" xmlns="http://www.w3.org/1999/html">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title id="title">失物招领</title>
  <link rel="stylesheet" type="text/css" href="__STATIC__/bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" type="text/css" href="__STATIC__/waterfall/css/style.css">
</head>
<style>
    body{
        background-repeat:no-repeat;
        background-attachment:fixed;
        background-size:100% 100% ;
        background-position:50% 50%;
    }
</style>
<body>
<input type="hidden" value="{$lost_or_pick}"id="lost_or_pick">
<input type="hidden" value="{$servername}" id="servername">
  <include file="Public/nav"/>
  <input type='hidden' value="{$id}" id=3 >
  <div id="main">
      <volist name="picture" id="vo">
          <div class="box">
              <a href="{:U('Home/Information/index?id='.$vo['id'])}" > <div class="pic"><img src="__PUBLIC__{$vo.pic1}" alt=""  onerror="imgError(this);"><span>{$vo.name}</span></div></a>
          </div>
          </volist>
      </div>
  <script src="__STATIC__/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="__STATIC__/waterfall/js.js"></script>
  <script src="__STATIC__/bootstrap/js/bootstrap.min.js"></script>
  <script type="text/javascript" >
   var url = "__APP__";
      var url1="__ROOT__";
      var Public="__PUBLIC__";
  //图片加载错误处理
  function imgError(image){
    // 替换为默认图片
    console.log(image)
    image.setAttribute("src", Public+'/Img/noPicture.jpg');
    image.onerror=null;
}
     //设置背景图片
      document.body.style.backgroundImage="url(__PUBLIC__/Img/bg-all.jpg)";
      document.body.style.height=document.documentElement.clientHeight+'px';
      var lost_or_pick=document.getElementById("lost_or_pick").value;
     //根据lost_or_pick更改标题
      if(lost_or_pick==0)
      document.getElementById("title").innerHTML='失物信息';
      else
      if(lost_or_pick==1)
          document.getElementById("title").innerHTML='招领信息';
      //没有图片时增加默认图片
      var servername=document.getElementById("servername").value;
      var img=document.getElementsByTagName('img');
      for(var i=0;i<img.length;i++)
      {
         if(img[i].src=='http://'+servername+Public+'/')
         img[i].src=Public+'/Img/noPicture.jpg';
      }    
  </script>
    <script type="text/javascript" src="__STATIC__/login.js"></script>
</body>
</html>